package ten;

/**
 * Created by ab on 2016/11/4.
 */
public class lesson7 {
    private static class ParcelContents implements Contents{
        private int i = 11;
        @Override
        public int value() {
            return i;
        }
    }
    protected static class ParcelDestination implements Destination{
        private String label;
        private ParcelDestination(String whereTo){
            label=whereTo;
        }
        @Override
        public String readLine() {
            return label;
        }
    }
    public static Destination destination(String s){
        return new ParcelDestination(s);
    }
    public static Contents contents(){
        return new ParcelContents();
    }
    public static void main(String[] args){
        Contents c = contents();
        Destination d = destination("Tasmania");
    }
}
